import Relay from "react-relay";
export default class FindByPhoneMutation extends Relay.Mutation {

    static fragments = {};

    getMutation() {
        return Relay.QL`mutation { findByPhone }`;
    }

    getVariables() {
        return {
            argsInput: {
                phone:this.props.phone,
            }
        };
    }

    getFatQuery() {
        return Relay.QL`fragment on findByPhonePayload {
            findByPhone {
                errorCode
                value
                totalResult
                id
                token
                userModel{
                    uid
                    password
                    name
                    phone
                }
                
            }
        }`;
    }

    getConfigs() {
        return [{
            type: 'REQUIRED_CHILDREN',
            children: [Relay.QL`
             fragment on findByPhonePayload {
                    findByPhone {
                        errorCode
                        value
                        totalResult
                        id
                        token
                        userModel{
                            uid
                            password
                            name
                            phone
                        }
                        
                    }
                }
            `]
        }];
    }

}